
<div class="aw-content-wrap">
    <div class="mod">
        <div class="mod-head">
            <h3>
                <span class="pull-left">编辑用户资料</span>
            </h3>
        </div>
        <div class="tab-content mod-content">
            <form action="http://127.0.0.1/wenda/?/admin/ajax/remove_user/" method="post" id="remove_user_form">
            <table class="table">
                <tbody><tr>
                    <td>
                        <div class="form-group">
                            <span class="col-sm-4 col-xs-3 control-label">删除用户:</span>
                            <div class="col-sm-7 col-xs-8">
                                <input type="hidden" name="uid" value="2">

                                <label><div class="icheckbox_square-blue" style="position: relative;"><input name="remove_user" id="remove_user" type="checkbox" value="1" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div> 确认删除这个用户</label>

                                <label><div class="icheckbox_square-blue" style="position: relative;"><input name="remove_user_data" id="remove_user_data" type="checkbox" value="1" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div> 删除用户发布的内容</label>

                                <a class="btn btn-danger btn-xs" onclick="if (!document.getElementById(&#39;remove_user&#39;).checked) { AWS.alert(&#39;请先确认删除操作&#39;); } else { AWS.ajax_post($(&#39;#remove_user_form&#39;)); }">删除用户</a>

                            </div>
                        </div>
                    </td>
                </tr>
            </tbody></table>
            </form>
                <form action="{:U('Admin/User/update')}" id="settings_form" enctype="multipart/form-data" method="post" >
                <table class="table table-striped">
                    <input name="id" type="hidden" value="{$userInfo['id']}">
                    <tbody><tr>
                        <td>
                            <div class="form-group">
                                <span class="col-sm-4 col-xs-3 control-label">用户名:</span>
                                <div class="col-sm-5 col-xs-8">
                                    <input class="form-control" name="user_name" type="text" value="{$userInfo['username']}">
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="form-group">
                                <span class="col-sm-4 col-xs-3 control-label">邮箱:</span>
                                <div class="col-sm-5 col-xs-8">
                                    <input class="form-control" name="email" type="text" value="{$userInfo['mail']}">
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="form-group">
                                <span class="col-sm-4 col-xs-3 control-label">密码:</span>
                                <div class="col-sm-5 col-xs-8">
                                    <input class="form-control" name="password" type="password" value="">

                                    <span class="help-block">不更改请留空</span>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="form-group">
                                <label class="col-sm-4 col-xs-3 control-label">居住地:</label>

                                <div class="col-sm-5 col-xs-8">
                                    <select name="province" class="select_area form-control" style="display: inline-block;">
                                        <option value="{$userInfo['province']}" selected="">{$userInfo['province']}</option>
                                        <option value="">请选择省份或直辖市</option>
                                        <option value="安徽省">安徽省</option>
                                        <option value="北京市">北京市</option>
                                        <option value="福建省">福建省</option>
                                        <option value="甘肃省">甘肃省</option>
                                        <option value="广东省">广东省</option>
                                        <option value="广西壮族自治区">广西壮族自治区</option>
                                        <option value="贵州省">贵州省</option>
                                        <option value="海南省">海南省</option>
                                        <option value="河北省">河北省</option>
                                        <option value="河南省">河南省</option>
                                        <option value="黑龙江省">黑龙江省</option>
                                        <option value="湖北省">湖北省</option>
                                        <option value="湖南省">湖南省</option>
                                        <option value="吉林省">吉林省</option>
                                        <option value="江苏省">江苏省</option>
                                        <option value="江西省">江西省</option>
                                        <option value="辽宁省">辽宁省</option>
                                        <option value="内蒙古自治区">内蒙古自治区</option>
                                        <option value="宁夏回族自治区">宁夏回族自治区</option>
                                        <option value="青海省">青海省</option>
                                        <option value="山东省">山东省</option>
                                        <option value="山西省">山西省</option>
                                        <option value="陕西省">陕西省</option>
                                        <option value="上海市">上海市</option>
                                        <option value="四川省">四川省</option>
                                        <option value="天津市">天津市</option>
                                        <option value="西藏自治区">西藏自治区</option>
                                        <option value="新疆维吾尔自治区">新疆维吾尔自治区</option>
                                        <option value="云南省">云南省</option>
                                        <option value="浙江省">浙江省</option>
                                        <option value="重庆市">重庆市</option>
                                        <option value="香港">香港</option>
                                        <option value="澳门">澳门</option>
                                        <option value="台湾">台湾</option>
                                    </select>

                                </div>
                                <div class="col-sm-3 col-xs-3">
                                    <select name="city" class="select_area form-control hide"></select>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="form-group">
                                <label class="col-sm-4 col-xs-3 control-label">职业:</label>

                                <div class="col-sm-5 col-xs-8">
                                    <select name="job" class="form-control">
                                        <option value="">--</option>
                                        <foreach name="jobsInfo" item="v">
                                            <if condition="$v['name']==$userInfo['job']">
                                                <option value="{$v['name']}" selected>{$v['name']}</option>
                                            <else/>
                                                <option value="{$v['name']}">{$v['name']}</option>
                                            </if>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="form-group">
                                <label class="col-sm-4 col-xs-3 control-label">手机号码:</label>

                                <div class="col-sm-5 col-xs-8">
                                    <input class="form-control" name="mobile" type="text" value="{$userInfo['phone']}">
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="form-group">
                                <label class="col-sm-4 col-xs-3 control-label">QQ:</label>

                                <div class="col-sm-5 col-xs-8">
                                    <input class="form-control" name="qq" type="text" value="{$userInfo['qq']}">
                                </div>
                            </div>
                        </td>
                    </tr>
                    <!--<tr>-->
                        <!--<td>-->
                            <!--<div class="form-group">-->
                                <!--<label class="col-sm-4 col-xs-3 control-label">常用邮箱:</label>-->

                                <!--<div class="col-sm-5 col-xs-8">-->
                                    <!--<input class="form-control" name="common_email" type="text" value="">-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</td>-->
                    <!--</tr>-->
                    <tr>
                        <td>
                            <div class="form-group">
                                <label class="col-sm-4 col-xs-3 control-label">网站:</label>

                                <div class="col-sm-5 col-xs-8">
                                    <input class="form-control" name="homepage" type="text" value="{$userInfo['site']}">
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="form-group">
                                <label class="col-sm-4 col-xs-3 control-label">一句话介绍:</label>

                                <div class="col-sm-5 col-xs-8">
                                    <input class="form-control" name="signature" type="text" value="{$userInfo['introduce']}">
                                </div>
                            </div>
                        </td>
                    </tr>
                    <!--<tr>-->
                        <!--<td>-->
                            <!--<div class="form-group">-->
                                <!--<label class="col-sm-4 col-xs-3 control-label">积分:</label>-->

                                <!--<div class="col-sm-5 col-xs-8">-->
                                    <!--1980 &nbsp; <a class="btn btn-xs btn-danger" href="http://127.0.0.1/wenda/?/admin/user/integral_log/uid-2">操作积分</a>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</td>-->
                    <!--</tr>-->
                    <!--<tr>-->
                        <!--<td>-->
                            <!--<div class="form-group">-->
                                <!--<span class="col-sm-4 col-xs-3 control-label">邮箱激活状态:</span>-->
                                <!--<div class="col-sm-6 col-xs-8">-->
                                    <!--<div class="btn-group mod-btn">-->
                                        <!--<label type="button" class="btn mod-btn-color">-->
                                            <!--<div class="iradio_square-blue" style="position: relative;"><input type="radio" name="valid_email" value="1" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div> 是                                        </label>-->

                                        <!--<label type="button" class="btn mod-btn-color">-->
                                            <!--<div class="iradio_square-blue checked" style="position: relative;"><input type="radio" name="valid_email" value="0" checked="checked" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div> 否                                        </label>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</td>-->
                    <!--</tr>-->
                    <!--<tr>-->
                        <!--<td>-->
                            <!--<div class="form-group">-->
                                <!--<span class="col-sm-4 col-xs-3 control-label">认证用户:</span>-->
                                <!--<div class="col-sm-8 col-xs-8">-->
                                    <!--<label class="checkbox-inline"><div class="iradio_square-blue checked" style="position: relative;"><input type="radio" name="verified" value="" checked="checked" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div>无</label>-->
                                    <!--<label class="checkbox-inline"><div class="iradio_square-blue" style="position: relative;"><input type="radio" name="verified" value="personal" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div>个人认证</label>-->
                                    <!--<label class="checkbox-inline"><div class="iradio_square-blue" style="position: relative;"><input type="radio" name="verified" value="enterprise" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div>机构认证</label>-->
                                    <!--&nbsp; <a href="http://127.0.0.1/wenda/?/admin/user/verify_approval_edit/2" class="btn btn-xs btn-danger">编辑认证审核资料</a>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</td>-->
                    <!--</tr>-->
                    <!--<tr>-->
                        <!--<td>-->
                            <!--<div class="form-group">-->
                                <!--<span class="col-sm-4 col-xs-3 control-label">头像:</span>-->
                                <!--<div class="col-sm-2">-->
                                    <!--<p>-->
                                        <!--<img src="__ROOT__{$userInfo['face_url']}" alt="" class="img-polaroid">-->
                                    <!--</p>-->
                                    <!--<span class="mod-file">-->
                                        <!--<input type="button" class="btn btn-primary" value="点击更换头像">-->
                                        <!--<input type="file" name="user_avatar" exts="png|jpg|bmp|jpeg" class="mod-input-file">-->
                                    <!--</span><br>-->
                                    <!--<p class="filetext"></p>-->
                                    <!--<label>-->
                                        <!--<div class="icheckbox_square-blue" style="position: relative;">-->
                                            <!--<input name="delete_avatar" type="checkbox" value="1" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);">-->
                                            <!--<ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins>-->
                                        <!--</div> 删除头像-->
                                    <!--</label>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</td>-->
                    <!--</tr>-->

                    <!--<tr>-->
                        <!--<td>-->
                            <!--<div class="form-group">-->
                                <!--<span class="col-sm-4 col-xs-3 control-label">会员组:</span>-->
                                <!--<div class="col-sm-6 col-xs-8">-->
                                    <!--<div class="btn-group mod-btn">-->
                                        <!--注册会员                                    </div>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</td>-->
                    <!--</tr>-->

                    <tr>
                        <td>
                            <div class="form-group">
                                <label class="col-sm-4 col-xs-3 control-label">系统组:</label>
                                <div class="col-sm-5 col-xs-8">
                                    <select name="group_name" class="form-control">
                                        <foreach name="groupInfo" item="v">
                                            <if condition="$v['id']==$userInfo['gid']">
                                                <option value="{$v['group_name']}" selected>{$v['group_name']}</option>
                                            <else/>
                                                <option value="{$v['group_name']}">{$v['group_name']}</option>
                                            </if>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                        </td>
                    </tr>

                    <!--<tr>-->
                        <!--<td>-->
                            <!--<div class="form-group">-->
                                <!--<span class="col-sm-4 col-xs-3 control-label">封禁用户:</span>-->
                                <!--<div class="col-sm-6 col-xs-8">-->
                                    <!--<div class="btn-group mod-btn">-->
                                        <!--<label type="button" class="btn mod-btn-color">-->
                                            <!--<div class="iradio_square-blue" style="position: relative;"><input type="radio" name="forbidden" value="1" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div> 是                                        </label>-->

                                        <!--<label type="button" class="btn mod-btn-color">-->
                                            <!--<div class="iradio_square-blue checked" style="position: relative;"><input type="radio" name="forbidden" value="0" checked="checked" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div> 否                                        </label>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</td>-->
                    <!--</tr>-->

                    <tr>
                        <td>
                            <div class="form-group">
                                <span class="col-sm-4 col-xs-3 control-label">注册时间:</span>
                                <div class="col-sm-6 col-xs-8">
                                    <div class="btn-group mod-btn">{$userInfo['register_time']|date="Y-m-d H:i:s",###}</div>
                                </div>
                            </div>
                        </td>
                    </tr>

                    <!--<tr>-->
                        <!--<td>-->
                            <!--<div class="form-group">-->
                                <!--<span class="col-sm-4 col-xs-3 control-label">注册 IP:</span>-->
                                <!--<div class="col-sm-6 col-xs-8">-->
                                    <!--<div class="btn-group mod-btn">127.0.0.1</div>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</td>-->
                    <!--</tr>-->
                    <!---->
                    <!--<tr>-->
                        <!--<td>-->
                            <!--<div class="form-group">-->
                                <!--<span class="col-sm-4 col-xs-3 control-label">上次登录 IP:</span>-->
                                <!--<div class="col-sm-6 col-xs-8">-->
                                    <!--<div class="btn-group mod-btn">127.0.0.1</div>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</td>-->
                    <!--</tr>-->
                    
                    <tr>
                        <td>
                            <div class="form-group">
                                <span class="col-sm-4 col-xs-3 control-label">上次登录时间:</span>
                                <div class="col-sm-6 col-xs-8">
                                    <div class="btn-group mod-btn">{$userInfo['login_time']|date="Y-m-d H:i:s",###}</div>
                                </div>
                            </div>
                        </td>
                    </tr>
                    
                    <tr>
                        <td>
                            <div class="form-group">
                                <span class="col-sm-4 col-xs-3 control-label">性别:</span>
                                <div class="col-sm-8 col-xs-8">
                                    <label class="checkbox-inline">
                                        <!--<div class="iradio_square-blue" style="position: relative;">-->
                                            <input name="sex" id="sex" value="1" type="radio" <if condition ="$userInfo['sex']=='男'"> checked = "checked" </if>>男
                                            <!--<input type="radio" name="sex" value="1" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);">-->
                                            <!--<ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins>-->
                                        <!--</div>-->
                                    </label>
                                    <label class="checkbox-inline">
                                        <!--<div class="iradio_square-blue" style="position: relative;">-->
                                            <input name="sex" id="sex" value="2" type="radio" <if condition ="$userInfo['sex']=='女'"> checked = "checked" </if>>女
                                            <!--<input type="radio" name="sex" value="2" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);">-->
                                            <!--<ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins>-->
                                        <!--</div>-->
                                    </label>
                                    <label class="checkbox-inline">
                                        <!--<div class="iradio_square-blue checked" style="position: relative;">-->
                                            <input name="sex" id="sex" value="3" type="radio" <if condition ="$userInfo['sex']=='保密'"> checked = "checked" </if>>保密
                                            <!--<input type="radio" name="sex" value="3" checked="checked" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);">-->
                                            <!--<ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins>-->
                                        <!--</div>-->
                                    </label>
                                </div>
                            </div>
                        </td>
                    </tr>

                    <!--<tr>-->
                        <!--<td>-->
                            <!--<div class="form-group">-->
                                <!--<label class="col-sm-4 col-xs-3 control-label">可用邀请名额:</label>-->

                                <!--<div class="col-sm-5 col-xs-8">-->
                                    <!--<input class="form-control" name="invitation_available" type="text" value="5">-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</td>-->
                    <!--</tr>-->

                </tbody><tfoot>
                <tr>
                    <td>
                        <!--<input type="button" value="保存设置" class="btn btn-primary center-block" onclick="AWS.ajax_post($(&#39;#settings_form&#39;));">-->
                        <input type="submit" value="保存设置" class="btn btn-primary center-block" onclick="AWS.ajax_post($(&#39;#settings_form&#39;));">
                    </td>
                </tr>
                </tfoot>
            </table>
            </form>
        </div>
    </div>
</div>

<script type="text/javascript">
$(document).ready(function () {
    $('.select_area').LocationSelect({
        labels: ["请选择省份或直辖市", "请选择城市"],
        elements: document.getElementsByTagName("select"),
        detector: function () {
            this.select(["", ""]);
        },
        dataUrl: G_BASE_URL.replace('/?', '') + '/static/js/areas.js'
    });

    $('.mod-input-file').change(function(){
        $('.filetext').text($('.mod-input-file').val());
    });
});
</script>

